home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
PInterfaces
/
AppleScript.p
< prev
next >
Wrap
Text File
|
1996-05-01
|
6KB
|
195 lines
{
File: AppleScript.p
Contains: AppleScript Specific Interfaces.
Version: Technology: AppleScript 1.1
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
}
{$IFC UNDEFINED UsingIncludes}
{$SETC UsingIncludes := 0}
{$ENDC}
{$IFC NOT UsingIncludes}
UNIT AppleScript;
INTERFACE
{$ENDC}
{$IFC UNDEFINED __APPLESCRIPT__}
{$SETC __APPLESCRIPT__ := 1}
{$I+}
{$SETC AppleScriptIncludes := UsingIncludes}
{$SETC UsingIncludes := 1}
{$IFC UNDEFINED __ERRORS__}
{$I Errors.p}
{$ENDC}
{$IFC UNDEFINED __APPLEEVENTS__}
{$I AppleEvents.p}
{$ENDC}
{$IFC UNDEFINED __OSA__}
{$I OSA.p}
{$ENDC}
{$IFC UNDEFINED __TEXTEDIT__}
{$I TextEdit.p}
{$ENDC}
{$PUSH}
{$ALIGN MAC68K}
{$LibExport+}
{$IFC FOR_SYSTEM7_ONLY }
{
*************************************************************************
Types and Constants
*************************************************************************
}
{
The specific type for the AppleScript instance of the
Open Scripting Architecture type.
}
CONST
typeAppleScript = 'ascr';
kAppleScriptSubtype = 'ascr';
typeASStorage = 'ascr';
{
*************************************************************************
Component Selectors
*************************************************************************
}
kASSelectInit = $1001;
kASSelectSetSourceStyles = $1002;
kASSelectGetSourceStyles = $1003;
kASSelectGetSourceStyleNames = $1004;
{
*************************************************************************
OSAGetScriptInfo Selectors
*************************************************************************
}
kASHasOpenHandler = 'hsod';
{
This selector is used to query a context as to whether it contains
a handler for the kAEOpenDocuments event. This allows "applets" to be
distinguished from "droplets." OSAGetScriptInfo returns false if
there is no kAEOpenDocuments handler, and returns the error value
errOSAInvalidAccess if the input is not a context.
}
{
*************************************************************************
Initialization
*************************************************************************
}
FUNCTION ASInit(scriptingComponent: ComponentInstance; modeFlags: LONGINT; minStackSize: LONGINT; preferredStackSize: LONGINT; maxStackSize: LONGINT; minHeapSize: LONGINT; preferredHeapSize: LONGINT; maxHeapSize: LONGINT): OSAError;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $001C, $1001, $7000, $A82A;
{$ENDC}
{
ComponentCallNow(kASSelectInit, 28);
This call can be used to explicitly initialize AppleScript. If it is
not called, the a scripting size resource is looked for and used. If
there is no scripting size resource, then the constants listed below
are used. If at any stage (the init call, the size resource, the
defaults) any of these parameters are zero, then parameters from the
next stage are used. ModeFlags are not currently used.
Errors:
errOSASystemError initialization failed
}
{
These values will be used if ASInit is not called explicitly, or if any
of ASInit's parameters are zero:
}
CONST
kASDefaultMinStackSize = 4096;
kASDefaultPreferredStackSize = 16384;
kASDefaultMaxStackSize = 16384;
kASDefaultMinHeapSize = 4096;
kASDefaultPreferredHeapSize = 16384;
kASDefaultMaxHeapSize = 33554432;
{
*************************************************************************
Source Styles
*************************************************************************
}
FUNCTION ASSetSourceStyles(scriptingComponent: ComponentInstance; sourceStyles: STHandle): OSAError;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $1002, $7000, $A82A;
{$ENDC}
{
ComponentCallNow(kASSelectSetSourceStyles, 4);
Errors:
errOSASystemError operation failed
}
FUNCTION ASGetSourceStyles(scriptingComponent: ComponentInstance; VAR resultingSourceStyles: STHandle): OSAError;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0004, $1003, $7000, $A82A;
{$ENDC}
{
ComponentCallNow(kASSelectGetSourceStyles, 4);
Errors:
errOSASystemError operation failed
}
FUNCTION ASGetSourceStyleNames(scriptingComponent: ComponentInstance; modeFlags: LONGINT; VAR resultingSourceStyleNamesList: AEDescList): OSAError;
{$IFC NOT GENERATINGCFM}
INLINE $2F3C, $0008, $1004, $7000, $A82A;
{$ENDC}
{
ComponentCallNow(kASSelectGetSourceStyleNames, 8);
This call returns an AEList of styled text descriptors the names of the
source styles in the current dialect. The order of the names corresponds
to the order of the source style constants, below. The style of each
name is the same as the styles returned by ASGetSourceStyles.
Errors:
errOSASystemError operation failed
}
{
Elements of STHandle correspond to following categories of tokens, and
accessed through following index constants:
}
CONST
kASSourceStyleUncompiledText = 0;
kASSourceStyleNormalText = 1;
kASSourceStyleLanguageKeyword = 2;
kASSourceStyleApplicationKeyword = 3;
kASSourceStyleComment = 4;
kASSourceStyleLiteral = 5;
kASSourceStyleUserSymbol = 6;
kASSourceStyleObjectSpecifier = 7;
kASNumberOfSourceStyles = 8;
{ Gestalt selectors for AppleScript }
gestaltAppleScriptAttr = 'ascr';
gestaltAppleScriptVersion = 'ascv';
gestaltAppleScriptPresent = 0;
gestaltAppleScriptPowerPCSupport = 1;
{$ENDC}
{$ALIGN RESET}
{$POP}
{$SETC UsingIncludes := AppleScriptIncludes}
{$ENDC} {__APPLESCRIPT__}
{$IFC NOT UsingIncludes}
END.
{$ENDC}